Skip to content

feat(anchor): add stderr message when no venv found#21

Merged
benbenbang merged 1 commit into
mainfrom
tests/integration_tests
Mar 27, 2026
Merged

feat(anchor): add stderr message when no venv found#21
benbenbang merged 1 commit into
mainfrom
tests/integration_tests

Conversation

@benbenbang

Copy link
Copy Markdown
Owner

This pull request improves the user experience when running the anchor command without a virtual environment by providing clear feedback on stderr, and updates the integration test to verify this behavior.

Anchor command enhancement:

  • Modified src/main.rs to print an informative message to stderr when no .venv directory is found, showing the path where the search was performed
  • The message follows the format "uv-shell anchor: no .venv found in " to help users understand why no output was produced

Test updates:

  • Renamed test anchor_no_venv_silent to anchor_no_venv_reports_on_stderr in tests/integration.rs to better reflect the new behavior
  • Updated test assertions to verify that stdout remains empty while stderr contains the expected "no .venv found" message

This pull request improves the user experience when running the anchor command without a virtual environment by providing clear feedback on stderr, and updates the integration test to verify this behavior.

**Anchor command enhancement:**
* Modified `src/main.rs` to print an informative message to stderr when no `.venv` directory is found, showing the path where the search was performed
* The message follows the format "uv-shell anchor: no .venv found in <path>" to help users understand why no output was produced

**Test updates:**
* Renamed test `anchor_no_venv_silent` to `anchor_no_venv_reports_on_stderr` in `tests/integration.rs` to better reflect the new behavior
* Updated test assertions to verify that stdout remains empty while stderr contains the expected "no .venv found" message
@github-actions github-actions Bot added enhancement New feature or request triage labels Mar 27, 2026
@benbenbang
benbenbang enabled auto-merge (squash) March 27, 2026 18:39
@benbenbang
benbenbang merged commit 45444b8 into main Mar 27, 2026
2 checks passed
@benbenbang
benbenbang deleted the tests/integration_tests branch March 27, 2026 18:39
@ptah-technical-app

Copy link
Copy Markdown

🎉 This PR is included in version 2.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant